---
layout: m1x_soap
title: Attribute List
---

<h2><a name="catalog_product_attribute.list-Module%3AMageCatalog"></a>Module: Mage_Catalog</h2>

<h4><a name="catalog_product_attribute.list-Resource%3Acatalogproductattribute"></a>Resource: catalog_product_attribute</h4>

<p><b>Aliases:</b></p>
<ul>
	<li>product_attribute</li>
</ul>


<h4><a name="catalog_product_attribute.list-Method%3A"></a>Method:</h4>

<ul>
	<li>catalog_product_attribute.list (SOAP V1)</li>
	<li>catalogProductAttributeList (SOAP V2)</li>
</ul>


<p>Allows you to retrieve the list of product attributes.</p>

<p><b>Aliases:</b></p>
<ul>
	<li>product_attribute.list</li>
</ul>



<p><b>Arguments:</b></p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> string </td>
<td> sessionId <br class="atl-forced-newline" /> </td>
<td> Session ID </td>
</tr>
<tr>
<td> int </td>
<td> setId <br class="atl-forced-newline" /> </td>
<td> ID of the attribute set </td>
</tr>
</tbody></table>


<p><b>Returns</b>:</p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> array </td>
<td> result </td>
<td> Array of catalogAttributeEntity </td>
</tr>
</tbody></table>


<p>The <b>catalogAttributeEntity</b> content is as follows:</p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> int </td>
<td> attribute_id <br class="atl-forced-newline" /> </td>
<td> Attribute ID </td>
</tr>
<tr>
<td> string </td>
<td> code <br class="atl-forced-newline" /> </td>
<td> Attribute code </td>
</tr>
<tr>
<td> string <br class="atl-forced-newline" /> </td>
<td> type <br class="atl-forced-newline" /> </td>
<td> Attribute type </td>
</tr>
<tr>
<td> string <br class="atl-forced-newline" /> </td>
<td> required <br class="atl-forced-newline" /> </td>
<td> Defines whether the attribute is required </td>
</tr>
<tr>
<td> string <br class="atl-forced-newline" /> </td>
<td> scope <br class="atl-forced-newline" /> </td>
<td> Attribute scope. Possible values: 'store', 'website', or 'global' </td>
</tr>
</tbody></table>


<p><b>Faults:</b></p>

<p><em>No faults</em></p>

<h4><a name="catalog_product_attribute.list-Examples"></a>Examples</h4>

<h5><a name="catalog_product_attribute.list-RequestExampleSOAPV1"></a>Request Example SOAP V1</h5>


<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div id="root">
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/soap/?wsdl');
$sessionId = $proxy-&gt;login('apiUser', 'apiKey');

$setid = 4; // Existing attribute set id

$result = $proxy-&gt;call(
    $sessionId,
    "product_attribute.list",
    array(
         $setId
    )
);
echo "&lt;pre&gt;";
var_dump($result);</pre>
		</div>
</div></div>

<h5><a name="catalog_product_attribute.list-RequestExampleSOAPV2"></a>Request Example SOAP V2</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div id="root">
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl'); // TODO : change url
$sessionId = $proxy-&gt;login('apiUser', 'apiKey'); // TODO : change login and pwd if necessary

$result = $proxy-&gt;catalogProductAttributeList($sessionId, '4');
var_dump($result);</pre>
		</div>
</div></div>


<h5><a name="catalog_product_attribute.list-RequestExampleSOAPV2%28WSIComplianceMode%29"></a>Request Example SOAP V2 (WS-I Compliance Mode)</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div id="root">
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl');

$sessionId = $proxy-&gt;login((object)array('username' =&gt; 'apiUser', 'apiKey' =&gt; 'apiKey'));

$result = $proxy-&gt;catalogProductAttributeList((object)array('sessionId' =&gt; $sessionId-&gt;result, 'setId' =&gt; '4'));

var_dump($result-&gt;result);</pre>
		</div>
</div></div>

<h5><a name="catalog_product_attribute.list-ResponseExampleSOAPV1"></a>Response Example SOAP V1</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div id="root">
		<pre class="theme: Default; brush: java; gutter: false">array
  0 =&gt;
    array
      'attribute_id' =&gt; string '71' (length=2)
      'code' =&gt; string 'name' (length=4)
      'type' =&gt; string 'text' (length=4)
      'required' =&gt; string '1' (length=1)
      'scope' =&gt; string 'store' (length=5)
  1 =&gt;
    array
      'attribute_id' =&gt; string '72' (length=2)
      'code' =&gt; string 'description' (length=11)
      'type' =&gt; string 'textarea' (length=8)
      'required' =&gt; string '1' (length=1)
      'scope' =&gt; string 'store' (length=5)</pre>
		</div>
</div></div>

<?php include(__ROOT__ . 'footer.php'); ?>
